<template>
  <page-body>
    <view class="page">
      <view class="flex align-stretch benben-position-layout flex rechange_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex align-center justify-between flex-sub rechange_fd0_0'>
          <view class='flex align-center rechange_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
            <text class='fu-iconfont2  rechange_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex align-center'>
            <text class='rechange_fd0_0_c1_c0'>充值结果</text>
          </view>
          <view class='flex align-center rechange_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

      <view class="flex flex-direction flex-wrap align-center benben-flex-layout rechange_flex_1">
        <image class='rechange_fd1_0' mode="aspectFit" :src='STATIC_URL+"97.png"'></image>
        <text class='rechange_fd1_1'>充值成功</text>
        <template v-for='(item,key0) in dataMessage'>
          <view class='flex flex-wrap align-center rechange_fd1_2' :key='key0'>
            <text>{{payable_money}}元({{money}}平台币)</text>
          </view>
        </template>

        <button class='rechange_fd1_3' @click.stop="submit">确定</button>
      </view>




    </view>
  </page-body>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "name_type": "",
        payable_money: '',
        "dataMessage": [],
        "type": "微信",
        "money": ""
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      let {
        type,
        money,
        payable_money
      } = options
      if (type !== undefined) this.type = type
      if (money !== undefined) this.money = money
      if (payable_money !== undefined) this.payable_money = payable_money
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.withdrawalFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      submit() {
        uni.navigateBack()
      },
      //提现
      async withdrawalFunc() {
        //请求方法
        //数据验证

        let datadataMessage = await this.$api.post(global.apiUrls.post665d2bb0f0f7c, {

        });

        if (datadataMessage.data.code != 1) {
          this.$message.info(datadataMessage.data.msg);
          return
        }
        let infodataMessage = datadataMessage.data;
        // this.dataMessage = infodataMessage.data
        this.money = parseFloat(infodataMessage.data.duihuan) * parseFloat(this.payable_money)
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #fff;
    background-size: 100% auto;
  }

  .rechange_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .rechange_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333;
  }

  .rechange_fd0_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 500;
    color: #333;
  }

  .rechange_fd0_0_c0 {
    width: 180rpx;
  }

  .rechange_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .rechange_flex_1 {
    padding: 185rpx 0rpx 0rpx 0rpx;
  }

  .rechange_fd1_3 {
    background: #5ECA71;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    width: 280rpx;
    line-height: 72rpx;
    font-size: 28rpx;
    color: #fff;
    height: 72rpx;
    margin: 50rpx 0rpx 0rpx 0rpx;
  }

  .rechange_fd1_2 {
    font-size: 28rpx;
    font-weight: 400;
    color: rgba(102, 102, 102, 1);
  }

  .rechange_fd1_1 {
    margin: 0rpx 0rpx 32rpx 0rpx;
    font-size: 36rpx;
    font-weight: 700;
    color: #333;
  }

  .rechange_fd1_0 {
    width: 250rpx;
    height: 180rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 0rpx 40rpx 0rpx;
  }
</style>
